home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 7923 < prev    next >
Encoding:
Text File  |  1996-08-05  |  2.2 KB  |  55 lines

  1. Path: redstone.interpath.net!mercury!softbase
  2. From: softbase@mercury.interpath.net (Scott McMahan - Softbase Systems)
  3. Newsgroups: comp.lang.c
  4. Subject: Re: QUESTION.LINKING PROCESS METHOD. HOW IT GOES?
  5. Date: 29 Feb 1996 18:13:50 GMT
  6. Organization: Interpath -- Providing Internet access to North Carolina
  7. Distribution: world
  8. Message-ID: <4h4qcu$24v@redstone.interpath.net>
  9. References: <4h1d26$nk5@diable.upc.es>
  10. NNTP-Posting-Host: mercury.interpath.com
  11. X-Newsreader: TIN [version 1.2 PL2]
  12.  
  13. CARLES_JORDA_NOGALES (EI39881395@xus.upc.es) wrote:
  14. :     3.1         If someones know about if in a link process
  15. :     3.2         there are some precedense or privilege of
  16. :     3.3         one module to the others please answer me
  17. :     3.4         and explain how it works.
  18.  
  19. This is totally system dependant. A lot of times, there is
  20. a definite order in the way modules are linked. I wrote
  21. a program once that had a COBOL "user exit" entry point
  22. I stupidly called "exit", linked it in with a C library
  23. that called the user exit, and when it was done linking
  24. the C stdlib exit() was called! The stdlib exit() overrode
  25. my entry point.
  26.  
  27. :     3.5         Other question about link process, when is
  28. :     3.6         made a link process results an executable
  29. :     3.7         program, in this executable ┐how are situated
  30. :     3.8         ona structured the modules?
  31.  
  32. This is completely system dependant. For UNIX, I recommend the book
  33. Deep C Secrets. It discusses the "standard" layout of an executable
  34. file in UNIX. Books for this type of information exist for other
  35. platforms too. Things  are more complex when you have static vs dynamic
  36. calls.
  37.  
  38. :     3.9                 ┐there are each one module in one whole piece
  39. :     3.91        and when the control have to translate to it
  40. :     3.92        there are JUMP instruction?
  41.  
  42. This is true only of *static* calls. Dynamic calls are much more
  43. involved. (This is true of everything from MVS to Windows -- dynamic
  44. calls involve operating system overhead to look for whatever it
  45. is you're calling. Static calls mean the routine is "glued" into
  46. the executable itself and the loader fixes up where these routines
  47. are in memory.)
  48.  
  49. Then you get into discarable/nondiscardable/reentrant/nonreentrant
  50. types of things which complicate what goes on.
  51.  
  52. Scott
  53.  
  54.  
  55.